package com.eascs.admin.o2o.backfee.trans;

import com.eascs.admin.o2o.backfee.entity.OaBackFeeEntity;
import com.eascs.admin.o2o.internal.entity.LoanapplyExpand;
import com.eascs.admin.o2o.loan.entity.O2oLoanapplyEntity;
import com.eascs.crm.common.entity.CustomerBasicInfoEntity;

public class OaBackFeeTransO2Oloanapply {

	//费用情况详情
	public static LoanapplyExpand transloanapplyExpand(OaBackFeeEntity oaBackFeeEntity) {
		LoanapplyExpand loanapplyExpand= new LoanapplyExpand();
		//保证金管理费
		loanapplyExpand.setRedDeposite(oaBackFeeEntity.getNetReceiptsBond()); //已交保证金
		loanapplyExpand.setRetaDeposite(oaBackFeeEntity.getRetiredBond());//已退保证金
		loanapplyExpand.setRedManger(oaBackFeeEntity.getNetReceiptsFee()); //已交管理费
		loanapplyExpand.setRetaManage(oaBackFeeEntity.getRetiredFee());//已退管理费
		loanapplyExpand.setRedRisk(oaBackFeeEntity.getNetReceiptsRisk()); //已交风险保证金
		loanapplyExpand.setRetaRisk(oaBackFeeEntity.getRetiredRisk());//已退风险保证金
		loanapplyExpand.setRecDeposite(oaBackFeeEntity.getReceivableBond());//应收保证金
		loanapplyExpand.setRecManger(oaBackFeeEntity.getReceivableFee());//应收管理费
		loanapplyExpand.setRecRisk(oaBackFeeEntity.getReceivableRisk());//应收风险补偿金
		loanapplyExpand.setBillCode(oaBackFeeEntity.getBillCode());
		loanapplyExpand.setLoanapply_no(oaBackFeeEntity.getLoanapplyno());
		return loanapplyExpand;
	}
	
	public static O2oLoanapplyEntity transO2oLoanapplyEntity(OaBackFeeEntity oaBackFeeEntity){
		O2oLoanapplyEntity o2oLoanapplyEntity= new O2oLoanapplyEntity();
		o2oLoanapplyEntity.setLoanapplyNo(oaBackFeeEntity.getLoanapplyno());
		o2oLoanapplyEntity.setBillCode(oaBackFeeEntity.getBillCode());
		o2oLoanapplyEntity.setCustomeRname(oaBackFeeEntity.getCustermName()); //客户名称:
		o2oLoanapplyEntity.setLtdName(oaBackFeeEntity.getNamecn());  //经营单位
		o2oLoanapplyEntity.setLtd(oaBackFeeEntity.getLtd());  //经营单位
		o2oLoanapplyEntity.setLoanaMount(oaBackFeeEntity.getLoanMount());  //申请金额
		o2oLoanapplyEntity.setLoanTerm(oaBackFeeEntity.getLoanTerm().intValue()); //申请期限
		o2oLoanapplyEntity.setRepayMentway(oaBackFeeEntity.getRepaymentWay()); //还款方式
		o2oLoanapplyEntity.setLoanrate(oaBackFeeEntity.getLoanRate()); //利率
		o2oLoanapplyEntity.setOperatorName(oaBackFeeEntity.getOperator()); //信贷经理
		o2oLoanapplyEntity.setLtdName(oaBackFeeEntity.getNamecn()); //经办平台
		o2oLoanapplyEntity.setBankType(oaBackFeeEntity.getBankType()); //送审银行
		o2oLoanapplyEntity.setLoanType(oaBackFeeEntity.getLoanType());//产品类型
		o2oLoanapplyEntity.setCreateDate(oaBackFeeEntity.getCreateDate()); //贷款申请日期
		o2oLoanapplyEntity.setGuarAnteeWay(oaBackFeeEntity.getGuaranteeWay()); 
		o2oLoanapplyEntity.setOperatorNo(oaBackFeeEntity.getOperatorno());//信贷经理id
		return o2oLoanapplyEntity;
	}
	public static CustomerBasicInfoEntity transCustomerBasicInfoEntity(OaBackFeeEntity oaBackFeeEntity){
		CustomerBasicInfoEntity customerBasicInfoEntity= new CustomerBasicInfoEntity();
		customerBasicInfoEntity.setCustomerName(oaBackFeeEntity.getUserName());  //借款人姓名
		customerBasicInfoEntity.setIdNumber(oaBackFeeEntity.getIdcard());   //借款人证件号码
		customerBasicInfoEntity.setMobileNumber(oaBackFeeEntity.getMobile());//电话号码
		return customerBasicInfoEntity;
	}
	
}
